<section class="site-section pt-5">
  <div class="container">
    <div class="row mb-4">
      <div class="col-md-6">
        <h2 class="mb-4"><%= gettext "Tag" %>: #<%= @tag.slug %></h2>
      </div>
    </div>
    <div class="row blog-entries">
      <div class="col-md-12 col-lg-8 main-content">
        <div class="row mb-5 mt-5">

          <div class="col-md-12">

            <%= for post <- @posts do %>
              <%= partial "post_list_item.html", Map.put(assigns, :post, post) %>
            <% end %>

          </div>
        </div>

        <div class="row mt-5">
          <div class="clearfix">
            <%=  if @paginator.has_prev? do %>
              <a class="btn btn-primary float-left" href="<%= prev_page_path(@conn, @paginator) %>">&larr; <%= gettext "Newer posts" %></a>
            <% end %>
            <%=  if @paginator.has_next? do %>
              <a class="btn btn-primary float-right" href="<%= next_page_path(@conn, @paginator) %>"><%= gettext "Older posts" %> &rarr;</a>
            <% end %>
          </div>
        </div>
      </div>
      <%= partial "sidebar.html", assigns %>
    </div>
  </div>
</section>
